
#ifndef _SDK__BACKUP_MANAGER_H__INCLUDED_
#define _SDK__BACKUP_MANAGER_H__INCLUDED_

#include "Logger.h"
#include "ServiceAgent.h"
#include "Task.h"
#include "Utility/ErrorCode.h"
#include <vector>


namespace nebula { namespace sdk  {

class IBackupManager
{
public:
	virtual ~IBackupManager() {};

public:
	virtual NEBULA_ERROR_CODE Initialize   (const char* backup_dir, const char* dead_dir, Logger *logger) = 0;
	virtual NEBULA_ERROR_CODE Finalize     () = 0;

	virtual NEBULA_ERROR_CODE LoadLegacyTasks (std::vector<ITask*> &, unsigned int max_tasks, TaskAllocator, IService *) = 0;

	virtual NEBULA_ERROR_CODE Backup       (ITask *) = 0;

	virtual NEBULA_ERROR_CODE ReadBackup   (const char* id, ITask *) = 0;
	virtual NEBULA_ERROR_CODE RemoveBackup (const char* id) = 0;
	virtual NEBULA_ERROR_CODE DeadTask     (ITask *) = 0;
};

}} // namespace nebula::sdk

#endif // _SDK__BACKUP_MANAGER_H__INCLUDED_

